<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

return new class extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('aq_conversation_details', function (Blueprint $table) {
            $table->comment('问答数据');
            $table->increments('id');
            $table->string('conversation_id', 50)->index()->default('');
            $table->text('request_text');
            $table->longText('response_text');
            $table->string('request_id')->index()->default(new \Illuminate\Database\Query\Expression('50'));
            $table->json('request_data');
            $table->json('response_data');
            $table->tinyInteger('score')->default(new \Illuminate\Database\Query\Expression('5'));
            $table->timestamps();
            $table->softDeletes();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('aq_conversation_details');
    }
};
